package com.dys.testproject;

/**
 * @className: com.dys.testproject.FruitPizzas
 * @description: com.dys.testproject
 * @author: pine cone
 * @version: v1.0.0
 * @createTime: 2024/07/22 下午10:53
 */
public class FruitPizzas extends BasePizzeria {
    private String dosing;

    public FruitPizzas() {
    }

    public FruitPizzas(String dosing) {
        this.dosing = dosing;
    }

    public FruitPizzas(String name, int size, double price, String dosing) {
        super(name, size, price);
        this.setDosing(dosing);
    }

    public String getDosing() {
        return dosing;
    }

    public void setDosing(String dosing) {
        if (dosing == null || "".equals(dosing)) {
            throw new RuntimeException("配料必填");
        }
        this.dosing = dosing;
    }

    @Override
    public String show() {
        return super.show() + "\n配料水果: " + this.dosing;
    }
}
